package com.wo.cloud.admin;

import com.wo.cloud.kafka.channel.LogChannel;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2021/4/27 17:01
 * Description:
 */

@SpringBootApplication
@EnableFeignClients(basePackages = {"com.wo.cloud"})
@EnableBinding(LogChannel.class)
@RefreshScope
public class AdminApplication {

    public static void main(String[] args) {
        System.setProperty("nacos.standalone", "true");
        SpringApplication.run(AdminApplication.class, args);
    }

    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
}
